import { createRouter, createWebHistory } from "vue-router";
import HelloWorld from "../components/HelloWorld.vue";
import ThreeView from "../components/ThreeView.vue";
import layout from "../layout/index.vue";
const routes = [
  {
    path: "/",
    name: "customPage",
    component: ThreeView,
  },
  {
    path: "/dev",
    name: "layout",
    component: layout,
    redirect: "/home",
    children: [
      {
        path: "/home",
        name: "首页",
        component: HelloWorld,
      },
      {
        path: "/threejs",
        name: "threejs场景",
        component: ThreeView,
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
